// 套装配置
const equipmentSets = {
    "静夜之预言者": {
        pieces: ["预言者的静夜风衣", "预言者的静夜短裙", "预言者的静夜肩甲", "预言者的静夜腰带", "预言者的静夜鞋子"],
        effects: {
            2: { // 2件套效果
                skill_attack_power: 11,
            },
            5: { // 5件套效果 TODO 这个套装随机效果暂时没法实现
                physical_crit: 280,
                magic_crit: 280,
                critical_damage: 18,
                // strength_percentage: 18,
                // intelligence_percentage: 18,
                // additional_damage: 25,
            }
        }
    },
    "愤怒魔女的炙焰战袍": {
        pieces: ["愤怒魔女的炙焰长袍", "愤怒魔女的炙焰长裤", "愤怒魔女的炙焰斗篷", "狡猾魔女的腰带", "敏捷魔女的靴子"],
        effects: {
            2: { // 2件套效果
                skill_attack_power: 8,
            },
            5: { // 5件套效果
                yellow_text: 32,
                element_direction: '火属性',
                element_power: 15,
                attribute_damage_percentage: 10,
            }
        }
    },
    "清辉天女": {
        pieces: ["清辉天女上衣", "清辉天女短裙", "清辉天女围巾", "清辉天女腰带", "清辉天女短靴"],
        effects: {
            2: { // 2件套效果
                skill_attack_power: 9,
            },
            5: { // 5件套效果
                additional_damage: 30,
                element_direction: '全属性',
                element_power: 30,
            }
        }
    },
    "艾莉的外出服": {
        pieces: ["白日梦想家", "叮当洋装", "妙妙毛帽子", "傲娇猫咪", "踢踏短靴"],
        effects: {
            2: { // 2件套效果
                skill_attack_power: 8,
            },
            5: { // 5件套效果
                yellow_text: 15,
                skill_attack_power: 8
            }
        }
    },
    "荒野猎人": {
        pieces: ["荒野的标记", "胜利的标记", "苦难的标记", "狩猎的标记", "追踪的标记"],
        effects: {
            2: { // 2件套效果
                skill_attack_power: 10,
            },
            5: { // 5件套效果
                yellow_text: 40,
                element_direction: '全属性',
                element_power: 35,
            }
        }
    },
    "千年玄铁兽战甲": {
        pieces: ["千年玄铁兽胸甲", "千年玄铁兽护腿", "黑铁皮甲肩甲", "千年玄铁兽腰带", "黑铁皮甲鞋子"],
        effects: {
            2: { // 2件套效果
                skill_attack_power: 8,
            },
            5: { // 5件套效果
                yellow_text: 24,
                element_direction: '暗属性',
                element_power: 30,
            }
        }
    },
    "火焰赫瑞克的炎甲": {
        pieces: ["火焰赫瑞克的炎甲上衣", "火焰赫瑞克的炎甲下装", "火焰赫瑞克的炎甲护肩", "火焰赫瑞克的炎甲腰带", "火焰赫瑞克的炎甲长靴"],
        effects: {
            2: { // 2件套效果
                skill_attack_power: 11,
            },
            5: { // 5件套效果
                additional_damage: 38
            }
        }
    },
    "史黛西的潜行服": {
        pieces: ["潜行者的锋芒夹克", "潜行者的锋芒长裤", "潜行者的锋芒肩带", "潜行者的锋芒腰带", "潜行者的锋芒长靴"],
        effects: {
            2: { // 2件套效果
                skill_attack_power: 13,
            },
            5: { // 5件套效果
                yellow_text: 8,
                critical_damage: 40
            }
        }
    },
    "向着未知航行": {
        pieces: ["漂浮的黑暗", "邻近的暗淡", "渐亮的黎明", "破碎的黄昏", "前进的勇气"],
        effects: {
            2: { // 2件套效果
                skill_attack_power: 7,
            },
            5: { // 5件套效果
                element_direction: '全属性',
                element_power: 69,
                skill_attack_power: 47
            }
        }
    },
    "克罗姆的生命轻甲": {
        pieces: ["克罗姆的生命护甲", "克罗姆的生命护腿", "克罗姆的生命护肩", "克罗姆的力量腰带", "克罗姆的元气靴子"],
        effects: {
            2: { // 2件套效果
                skill_attack_power: 10,
            },
            5: { // 5件套效果
                skill_attack_power: 10,
                yellow_text: 25,
                strength: 250,
                intelligence: 250,
                physical_crit: 220,
                magic_crit: 220,
            }
        }
    },
    "千钧之羽": {
        pieces: ["千钧之羽上衣", "千钧之羽下装", "千钧之羽护肩", "千钧之羽腰带", "千钧之羽战靴"],
        effects: {
            2: { // 2件套效果
                skill_attack_power: 11,
            },
            5: { // 5件套效果
                yellow_text: 33,
                element_direction: '全属性',
                element_power: 15,
            }
        }
    },
    "达丽雅*斯科特的武斗服": {
        pieces: ["达丽雅*斯科特的改良上衣", "达丽雅*斯科特的改良下装", "达丽雅*斯科特的战斗肩甲", "达丽雅*斯科特的轻甲腰带", "达丽雅*斯科特的轻甲战靴"],
        effects: {
            2: { // 2件套效果
                skill_attack_power: 10,
            },
            5: { // 5件套效果
                skill_attack_power: 6,
                strength_percentage: 24,
                intelligence_percentage: 24,
            }
        }
    },
    "深海的战栗": {
        pieces: ["黑暗中的盲人", "声音扭曲的支配者", "来自深渊的人", "吞海者", "海底潜行者"],
        effects: {
            2: { // 2件套效果
                skill_attack_power: 10,
            },
            5: { // 5件套效果
                yellow_text: 10,
                additional_damage: 45
            }
        }
    },
    "玄冥精灵重甲": {
        pieces: ["空间支配者胸甲", "次元支配者裤子", "时间支配者斗篷", "记忆支配者腰带", "光辉支配者靴子"],
        effects: {
            2: { // 2件套效果
                skill_attack_power: 11,
            },
            5: { // 5件套效果
                skill_attack_power: 8,
                additional_damage: 28
            }
        }
    },
    "巨树守护者": {
        pieces: ["巨树守护者罗丁的心智胸甲", "巨树守护者罗丁的根源腿甲", "巨树守护者罗丁的树皮头盔", "巨树守护者罗丁的枝干腰带", "巨树守护者罗丁的树状长靴"],
        effects: {
            2: { // 2件套效果
                element_direction: "冰属性",
                skill_attack_power: 9,
            },
            5: { // 5件套效果
                yellow_text: 33
            }
        }
    },
    "艾扎克的强化服": {
        pieces: ["漆黑的巨型机器", "歼灭机器", "亡者登场", "无尽追击", "溃灭装置"],
        effects: {
            2: { // 2件套效果
                skill_attack_power: 10,
            },
            5: { // 5件套效果
                additional_damage: 12,
                strength_percentage: 10,
                intelligence_percentage: 10
            }
        }
    },
    "灿烂的荣耀": {
        pieces: ["黄金庇佑甲胄", "黄金庇佑腿甲", "黄金庇佑肩甲", "黄金庇佑护腰", "黄金庇佑战靴"],
        effects: {
            2: { // 2件套效果
                skill_attack_power: 10
            },
            5: { // 5件套效果
                element_direction: "全属性",
                element_power: 10,
                yellow_text: 33,
                skill_attack_power: 10
            }
        }
    },
    "方寸之决胜者": {
        pieces: ["方寸之决胜者上衣", "方寸之决胜者下装", "方寸之决胜者护肩", "方寸之决胜者腰带", "方寸之决胜者长靴"],
        effects: {
            2: { // 2件套效果
                skill_attack_power: 9
            },
            5: { // 5件套效果
                physical_attack: 80,
                magic_attack: 80,
                yellow_text: 22
            }
        }
    },
    "古代文献守护者板甲": {
        pieces: ["古代遗迹守护者胸甲", "古代遗迹守护者护腿", "古代文献守护者肩甲", "古代宝石守护者腰带", "古代遗迹守护者战靴"],
        effects: {
            2: { // 2件套效果
                skill_attack_power: 8
            },
            5: { // 5件套效果
                strength: 150,
                intelligence: 150,
                physical_attack: 80,
                magic_attack: 80,
            }
        }
    },
    "舰长的烈焰盾": {
        pieces: ["舰长的烈焰盾胸甲", "舰长的烈焰盾绑腿", "舰长的烈焰盾头盔", "舰长的烈焰盾腰带", "舰长的烈焰盾战靴"],
        effects: {
            2: { // 2件套效果
                skill_attack_power: 9
            },
            5: { // 5件套效果
                strength: 150,
                element_power: 50,
                yellow_text: 20
            }
        }
    },
    "战争狂欢曲": {
        pieces: ["迷惑的指挥-行板", "疯狂的旋律-阿切莱兰多", "破灭的演奏-渐强"],
        effects: {
            3: { // 3件套效果
                skill_attack_power: 24
            }
        }
    },
    "黎明的祈祷": {
        pieces: ["生命之露", "净化之水", "流浪之风"],
        effects: {
            3: { // 3件套效果
                skill_attack_power: 22,
                element_direction: "全属性",
                attribute_damage_percentage: 10
            }
        }
    },
    "蓝色真谛审判者": {
        pieces: ["审判者马塞尔的项链", "审判者马塞尔的戒指", "审判者马塞尔的手镯"],
        effects: {
            3: { // 3件套效果
                skill_attack_power: 17,
                element_direction: "全属性",
                element_power: 40
            }
        }
    },
    "波动谐鸣": {
        pieces: ["波动谐鸣项链", "波动谐鸣戒指", "波动谐鸣手镯"],
        effects: {
            3: { // 3件套效果
                physical_attack_percentage: 5,
                magic_attack_percentage: 5,
                skill_attack_power: 25
            }
        }
    },
    "混沌战争狂欢曲": {
        pieces: ["混沌迷惑的指挥-行板", "混沌疯狂的旋律-阿切莱兰多", "混沌破灭的演奏-渐强"],
        effects: {
            3: { // 3件套效果
                strength_percentage: 4,
                intelligence_percentage: 4,
                skill_attack_power: 24
            }
        }
    },
    "混沌黎明的祈祷": {
        pieces: ["混沌生命之露", "混沌净化之水", "混沌流浪之风"],
        effects: {
            3: { // 3件套效果
                skill_attack_power: 22,
                element_direction: "全属性",
                attribute_damage_percentage: 3 // TODO 随机性
            }
        }
    },
    "混沌蓝色真谛审判者": {
        pieces: ["混沌审判者马塞尔的项链", "混沌审判者马塞尔的戒指", "混沌审判者马塞尔的手镯"],
        effects: {
            3: { // 3件套效果
                skill_attack_power: 17,
                element_direction: "全属性",
                element_power: 49
            }
        }
    },
    "混沌波动谐鸣": {
        pieces: ["混沌波动谐鸣项链", "混沌波动谐鸣戒指", "混沌波动谐鸣手镯"],
        effects: {
            3: { // 3件套效果
                physical_attack_percentage: 10,
                magic_attack_percentage: 10,
                skill_attack_power: 25
            }
        }
    }
};

function getSetAttributeName(attr) {
    const attrNames = {
        strength: '力量',
        intelligence: '智力',
        physical_attack: '物理攻击力',
        magic_attack: '魔法攻击力',
        physical_crit: '物爆',
        magic_crit: '魔爆',
        physical_crit_percentage: '物理暴击率加成',
        magic_crit_percentage: '魔法暴击率加成',
        strength_percentage: '力量百分比',
        intelligence_percentage: '智力百分比',
        physical_attack_percentage: '物攻百分比',
        magic_attack_percentage: '魔攻百分比',
        yellow_text: '黄字',
        skill_attack_power: '技能攻击力加成',
        additional_damage: '白字',
        critical_damage: '爆伤',
        element_direction: '属强加成方向',
        element_power: '属强加成',
        attribute_damage_percentage: '属性伤害百分比',
    };
    return attrNames[attr] || attr;
}

function getSetAttributeUnit(attr) {
    const percentageAttrs = [
        'physical_crit_percentage',
        'magic_crit_percentage',
        'strength_percentage',
        'intelligence_percentage',
        'physical_attack_percentage',
        'magic_attack_percentage',
        'yellow_text',
        'skill_attack_power',
        'additional_damage',
        'critical_damage',
        'attribute_damage_percentage'
    ];
    return percentageAttrs.includes(attr) ? '%' : '';
}

module.exports = {
    equipmentSets,
    getSetAttributeName,
    getSetAttributeUnit
};